﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _56标志枚举
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            FileProp fileProp = FileProp.read | FileProp.hide;
            Console.WriteLine(fileProp);
        }
    }

    //多个枚举项可以组合的时候,需要用到标志枚举

    // [Flags]
    internal enum FileProp
    {
        read = 1,//标志枚举,每一项的值都必须时2的n次方
        write = 2,
        hide = 4
    }
}